package com.order.client;


import com.carcenter.common.pojo.order.MonthSale;
import com.carcenter.common.result.Result;
import com.order.client.fallback.OrderApiFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(
        value = "carcenter-service-order",
        fallback = OrderApiFallback.class)
public interface OrderApi {
    @PostMapping("/appointment-master/getMonthSalesByStoreIds/{month}")
    public Result<List<MonthSale>> getMonthSalesByStoreIds(@RequestBody List<Integer> storeIds, @PathVariable("month") String month);

    @PostMapping("/appointment-process/invalidAppointment/{appointmentId}/{userId}")
    public Result<String> invalidAppointment(@PathVariable("appointmentId") Integer appointmentId, @PathVariable("userId") Integer userId);
}
